package cn.edu.hbpu.service;

import cn.edu.hbpu.common.R;
import cn.edu.hbpu.dto.UserDto;
import cn.edu.hbpu.entity.User;

import java.io.IOException;
import java.util.Map;

/**
 * @author lcy
 * @date 2022/8/4 8:17
 * @description
 */
public interface UserService {
    /**
     * 登录
     *
     * @param user
     * @return
     */
    R<Map<Object, Object>> login(UserDto user);

    /**
     * 注册
     *
     * @param user
     * @return
     */
    R<Map<Object, Object>> register(UserDto user);

    /**
     * 生成验证码的Base64
     *
     * @return
     * @throws IOException
     */
    R<Map<Object, Object>> generateCode() throws IOException;


    /**
     * 退出登录
     *
     * @return
     */
    R<Map<Object, Object>> logout();

    /**
     * 根据用户id获取用户信息
     *
     * @return
     */
    R<User> getUserInfo();
}
